/*
    ************************************
    --------------Homework 5------------
    ************************************
    * @author (Greg Shevach & Chris Nerf)
    * @version (0)
    * @date (11/22/2011)
    */
    

public class homework5<E> {
  
  Tree tree;
  Node node = new Node();
  
  public homework5(Tree tree) {
    this.tree = tree;
    node = new Node();
  }
  
  //Combines two nodes into one node and then returns the result
  public E combine(Node left, Node right){
    node.setNextLeft(left);
    node.setNextRight(right);
    return (E)node;
  }
  
  //Prints the content of the trees
  public void print() {
    tree.printInorder(1);
  }
  
  //Gets the root of the tree
  public E getRoot(){
    return (E)tree.getElement(0);
  }
}